package main
import "fmt"

func main(){
	//实现功能：给出5个学生的成绩，求出总和，平均值
	//定义一个数组
	var scores [5]int
	scores[0] = 95
	scores[1] = 81
	scores[2] = 76
	scores[3] = 89
	scores[4] = 95

	var sum int = 0
	//求和：
	for i :=0;i < len(scores); i++{
		sum += scores[i]
	}
	fmt.Println("总成绩为：",sum)

	avg := sum / len(scores)
	fmt.Println("平均值为：",avg)
}